using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GameOver : MonoBehaviour
{
    private Animator anim;
    public GameObject fail;
    private int starCount = 0;
    public StarUI star1;
    public StarUI star2;
    public StarUI star3;
    private void Awake()
    {
        anim = GetComponent<Animator>();
        
    }
    
    public  void Show(int num)
    {
        anim.SetTrigger("Isshow");
        starCount=num;
        
    }
    public void ShowStar()
    {
       
        if (starCount == 0)
        {
            fail.SetActive(true);
        }
        if(starCount>=1){ 
            star1.show();
        }
        if (starCount >= 2)
        {
            star2.show();
        }
        if (starCount >= 3)
        {
            star3.show();
        }

    }
    public void Restart()
    {
        GameManager.Instance.OnReStart();
    }
    public void List()
    {
        GameManager.Instance.LevelList();
    }

}
